<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>后台管理</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link href="./res/layui/css/layui.css" rel="stylesheet">
  <script>
    if(!localStorage){
      alert("Browser does not support localstorage!");
    }else if(localStorage['jetee']!=undefined){
      var jetee=JSON.parse(localStorage['jetee']);
      var lang1=jetee['lang'];
      lang2=function(str){
        return lang1[str];
      }
    }else{
      lang2=function(str){ return '';}//语言包为空时
    }
    debug1=function(str,nolog=0){
      //return '';
      if(!nolog){
        console.log(str);
        return;
      }
      return str;//返回回显  方便调试
    }
  </script>
</head>
<body>
  <div id="LAY_app"></div>
  <script src="./res/layui/layui.js"></script>
  <script>
  layui.config({
    base: 'res/', // 静态资源所在路径
    version: '1.9.0'
  }).use('index', function(){
    var layer = layui.layer;
    var admin = layui.admin;
    // 提示语
    layer.ready(function(){
      if(layui.data(layui.setter.tableName).access_token==undefined){
        location.href='./#/user/login';
      }

      //载入cache
      if(typeof jetee=='undefined'){
        admin.req({
          url: './index/cache'
          ,type: 'get'
          ,done: function(res){
            if(res.code==0){
              localStorage['jetee']=JSON.stringify(res.data);
              location.reload();
            }
          }
        });
      }

    });
  });
  </script>
</body>
</html>


